import time

def decorator(add):
    def inner(*args,**kwargs):
        start =time.time()
        result=add(*args,**kwargs)
        end =time.time()
        print(f'程序运行时间:{end-start}')
        return result

    return inner


@decorator      #add1 = decorator(add1)
def add1(frequecy):
    for i in range(frequecy):
        print(i)


if __name__ == '__main__':
    add1(1000)